

import 'package:flutter/material.dart';
import 'package:junyeyishu/utils/Network.dart';
import 'package:junyeyishu/utils/ScreenFit.dart';
import 'package:junyeyishu/widgets/QGNavigationBar.dart';
import 'package:junyeyishu/widgets/QGWidget.dart';
import 'package:url_launcher/url_launcher.dart';


class QGDown extends StatefulWidget {
  const QGDown({super.key});
  @override
  State<QGDown> createState() => _QGLoginPageState();
}

class _QGLoginPageState extends State<QGDown> {
  int type = 0;
  @override
  void dispose() {
    super.dispose();
  }

  buildTop() {
    return QGNavigationBar(
      title: "",
      leftItem: GestureDetector(
        onTap: () {
          Navigator.of(context).pop();
        },
        child: Container(
          padding: EdgeInsets.all(15.rpx),
          child: QGImage(asset: "nav_back_white",width: 20.rpx),
        ),
      ),
      titleStyle: TextStyle(
        color: Colors.white,
        fontSize: 16.rpx,
        fontWeight: FontWeight.bold,
      ),
    );
  }
// junyue   anzhou   ioss
    @override
    Widget build(BuildContext context) {
      return  Stack(
        children: [
          QGImage(asset: 'downs',width: 375.rpx),
           Positioned(
            left: 100.rpx,
            right: 100.rpx,
            top: 200.rpx,
            child: QGImage(asset: 'junyue'),
           ),
        
          Positioned(
            left: 100.rpx,
            right: 100.rpx,
            bottom: 200.rpx,
            child: GestureDetector(
              onTap: () async{
                 await launchUrl(
                  Uri.parse("${Network.h5URL}/download.html"),
                  mode: LaunchMode.externalApplication,
                );
              },
              child: Container(
              alignment: Alignment.center,
              padding: EdgeInsets.symmetric(vertical: 10),
              decoration: BoxDecoration(
                color: Color(0XFF111111),
                borderRadius: BorderRadius.circular(30)
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                    QGImage(asset: 'anzhou',width: 15.rpx),
                    SizedBox(width: 15.rpx,),
                    Text('Android下载',style: TextStyle(fontSize: 16,color: Color(0XFFFFFFFF))),
                ],
              ),
            ),
            )
            
          ),
          Positioned(
            left: 100.rpx,
            right: 100.rpx,
            bottom: 130.rpx,
            child: 
            Container(
              alignment: Alignment.center,
              padding: EdgeInsets.symmetric(vertical: 10),
              decoration: BoxDecoration(
                color: Color(0XFF111111),
                borderRadius: BorderRadius.circular(30)
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                    QGImage(asset: 'ioss',width: 15.rpx),
                    SizedBox(width: 15.rpx,),
                    Text('IOS下载',style: TextStyle(fontSize: 16,color: Color(0XFFFFFFFF))),
                ],
              ),
            )
          ),
          buildTop(),
        ],
      );
    }
}